package com.springcloud.openfeign.controller;

import com.springcloud.openfeign.service.OpenFeignClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OpenFeignController {

    private Logger logger = LoggerFactory.getLogger(OpenFeignController.class);

    @Autowired
    OpenFeignClient openFeignClient;

    @GetMapping(value = "/test1")
    public void test1(){
        String str = openFeignClient.getStores();
        logger.info(str);
    }

    @GetMapping(value = "/testZuul")
    @ResponseBody
    public String testZuul(){
        return "这是open-feign子模块";
    }
}
